<%@ Page language="c#" Codebehind="RefHead.aspx.cs" AutoEventWireup="True" Inherits="DreamBuilder.UI.UserControls.clsRefHead" %>
<html>
	<head runat="server">
		<link href="../App_Themes/NewPage/Styles/layout.css" rel="Stylesheet" type="text/css" />
		<link href="../App_Themes/NewPage/Styles/tables.css" rel="Stylesheet" type="text/css" />
		<script language="javascript" type="text/javascript">
		    
		    function search() {
		        if (event.keyCode == 13) {
		            if (document.getElementById("skey").value == "") {
		                window.parent.frames("RefContent").location = 'RefList.aspx?ModuleID=' + document.getElementById("txtModuleID").value + '&TableCode=' + document.getElementById("txtTableCode").value + '&MultiSelect=' + document.getElementById("txtMultiSelect").value + '&WhereSql=' + document.getElementById("txtWhereSql").value + '&AutoPostBack=' + document.getElementById("txtAutoPostBack").value + '&DBHelperString=' + document.getElementById("txtDBHelperString").value;
		                return;
		            }
		            window.parent.frames("RefContent").location = 'RefList.aspx?Filter=' + escape(document.getElementById("skey").value + ' and type=1').replace(/\+/g, '%2B').replace(/\"/g, '%22').replace(/\'/g, '%27').replace(/\//g, '%2F') + '&ModuleID=' + document.getElementById("txtModuleID").value + '&TableCode=' + document.getElementById("txtTableCode").value + '&MultiSelect=' + document.getElementById("txtMultiSelect").value + '&WhereSql=' + document.getElementById("txtWhereSql").value + '&AutoPostBack=' + document.getElementById("txtAutoPostBack").value + '&DBHelperString=' + document.getElementById("txtDBHelperString").value;
		        }
		    }
		    function search2() {
		        if (document.getElementById("skey").value == "") {
		            window.parent.frames("RefContent").location = 'RefList.aspx?ModuleID=' + document.getElementById("txtModuleID").value + '&TableCode=' + document.getElementById("txtTableCode").value + '&MultiSelect=' + document.getElementById("txtMultiSelect").value + '&WhereSql=' + document.getElementById("txtWhereSql").value + '&AutoPostBack=' + document.getElementById("txtAutoPostBack").value + '&DBHelperString=' + document.getElementById("txtDBHelperString").value;
		            return;
		        }
		        window.parent.frames("RefContent").location = 'RefList.aspx?Filter=' + escape(document.getElementById("skey").value + ' and type=1').replace(/\+/g, '%2B').replace(/\"/g, '%22').replace(/\'/g, '%27').replace(/\//g, '%2F') + '&ModuleID=' + document.getElementById("txtModuleID").value + '&TableCode=' + document.getElementById("txtTableCode").value + '&MultiSelect=' + document.getElementById("txtMultiSelect").value + '&WhereSql=' + document.getElementById("txtWhereSql").value + '&AutoPostBack=' + document.getElementById("txtAutoPostBack").value + '&DBHelperString=' + document.getElementById("txtDBHelperString").value;
		    }			
		</script>
	</head>
	<body id="thebody">
		<table align="center" width="100%" class="Ref-head-search">
			<tr>
				<td align="right">
					<input type="text" id="txtModuleID" name="txtModuleID" style="WIDTH: 0px" runat="server" /> 
					<input type="text" id="txtTableCode" name="txtTableCode" style="WIDTH: 0px" runat="server"/>
					<input type="text" id="txtMultiSelect" name="txtMultiSelect" style="WIDTH: 0px" runat="server"/>
					<input type="text" id="txtWhereSql" name="txtWhereSql" style="WIDTH: 0px" runat="server"/> 
					<input type="text" id="txtFilter" name="txtFilter" style="WIDTH: 0px" runat="server"/>
					<input type="text" id="txtAutoPostBack" name="txtAutoPostBack" style="WIDTH: 0px" runat="server"/>
					<input type="text" id="txtDBHelperString" name="txtDBHelperString" style="WIDTH: 0px" runat="server"/>
					<asp:Literal Runat="server" ID="litSearch" ></asp:Literal>
					<input type="text" size="40"  maxlength="50" id="skey" name="skey" OnKeyDown="search()"/>
					<img src="../Images/UserControls/find.gif" alt="Search" title="Search" border="0" onclick="search2()"
						align="absMiddle" style="CURSOR:hand"/>
				</td>
				<td width="20"></td>
			</tr>
		</table>
	</body>
</html>
